package com.taobao.api.request;

import java.util.Date;
import java.util.Map;

import com.taobao.api.TaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.response.WlbExtorderPageGetResponse;
import com.taobao.api.ApiRuleException;
/**
 * TOP API: taobao.wlb.extorder.page.get request
 * 
 * @author auto create
 * @since 1.0, 2013-07-21 16:38:14
 */
public class WlbExtorderPageGetRequest implements TaobaoRequest<WlbExtorderPageGetResponse> {

	private Map<String, String> headerMap = new TaobaoHashMap();
	private TaobaoHashMap udfParams; // add user-defined text parameters
	private Long timestamp;

	/** 
	* 查询截止时间
	 */
	private Date endTime;

	/** 
	* 外部单据编号
	 */
	private String extOrderCode;

	/** 
	* 外部订单来源： （1）EXT_LC：推荐物流 （2）EXT_WLB：wlb_ext （3）EXT_ERP：erp （4）EXT_WMS： WMS盘点 （5）EXT_FENXIAO：分销  (6) EXT_OMS: OMS （7）EXT_ELINK： ELINK
	 */
	private String extOrderSource;

	/** 
	* 订单状态： DRAFT-订单已创建，CANCLE-订单已取消，CLOSED-订单关闭，SEND2WMS-下发中，WMS_RECEIVED-已下发，REJECT-接收方拒签，WMS_SEND-已发货，SIGNED-签收成功
	 */
	private String extOrderStatus;

	/** 
	* 分页的第几页
	 */
	private Long pageNo;

	/** 
	* 每页多少条
	 */
	private Long pageSize;

	/** 
	* 查询开始时间
	 */
	private Date startTime;

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	public Date getEndTime() {
		return this.endTime;
	}

	public void setExtOrderCode(String extOrderCode) {
		this.extOrderCode = extOrderCode;
	}
	public String getExtOrderCode() {
		return this.extOrderCode;
	}

	public void setExtOrderSource(String extOrderSource) {
		this.extOrderSource = extOrderSource;
	}
	public String getExtOrderSource() {
		return this.extOrderSource;
	}

	public void setExtOrderStatus(String extOrderStatus) {
		this.extOrderStatus = extOrderStatus;
	}
	public String getExtOrderStatus() {
		return this.extOrderStatus;
	}

	public void setPageNo(Long pageNo) {
		this.pageNo = pageNo;
	}
	public Long getPageNo() {
		return this.pageNo;
	}

	public void setPageSize(Long pageSize) {
		this.pageSize = pageSize;
	}
	public Long getPageSize() {
		return this.pageSize;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	public Date getStartTime() {
		return this.startTime;
	}

	public Long getTimestamp() {
		return this.timestamp;
	}

	public void setTimestamp(Long timestamp) {
		this.timestamp = timestamp;
	}

	public String getApiMethodName() {
		return "taobao.wlb.extorder.page.get";
	}

	public Map<String, String> getTextParams() {		
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("end_time", this.endTime);
		txtParams.put("ext_order_code", this.extOrderCode);
		txtParams.put("ext_order_source", this.extOrderSource);
		txtParams.put("ext_order_status", this.extOrderStatus);
		txtParams.put("page_no", this.pageNo);
		txtParams.put("page_size", this.pageSize);
		txtParams.put("start_time", this.startTime);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public void putOtherTextParam(String key, String value) {
		if(this.udfParams == null) {
			this.udfParams = new TaobaoHashMap();
		}
		this.udfParams.put(key, value);
	}

	public Class<WlbExtorderPageGetResponse> getResponseClass() {
		return WlbExtorderPageGetResponse.class;
	}

	public void check() throws ApiRuleException {
	}

	public Map<String, String> getHeaderMap() {
		return headerMap;
	}
}
